package com.play.springflux.exception;

import lombok.Data;

import java.io.Serializable;

@Data
public class CheckException extends RuntimeException implements Serializable {
    public String feildName;
    public String feildError;

    public CheckException() {
        super();
    }

    public CheckException(String message) {
        super(message);
    }

    public CheckException(String message, Throwable cause) {
        super(message, cause);
    }

    public CheckException(Throwable cause) {
        super(cause);
    }

    protected CheckException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public CheckException(String feildName, String feildError) {
        this.feildName = feildName;
        this.feildError = feildError;
    }

    public CheckException(String message, String feildName, String feildError) {
        super(message);
        this.feildName = feildName;
        this.feildError = feildError;
    }

    public CheckException(String message, Throwable cause, String feildName, String feildError) {
        super(message, cause);
        this.feildName = feildName;
        this.feildError = feildError;
    }

    public CheckException(Throwable cause, String feildName, String feildError) {
        super(cause);
        this.feildName = feildName;
        this.feildError = feildError;
    }

    public CheckException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, String feildName, String feildError) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.feildName = feildName;
        this.feildError = feildError;
    }
}
